package cn.iocoder.yudao.module.biz.dal.mysql.risk.basicManage;

import java.util.*;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.module.biz.controller.admin.risk.basicManage.vo.BizBasicManageExportReqVO;
import cn.iocoder.yudao.module.biz.controller.admin.risk.basicManage.vo.BizBasicManagePageReqVO;
import cn.iocoder.yudao.module.biz.controller.admin.risk.basicManage.vo.BizBasicManageRespVO;
import cn.iocoder.yudao.module.biz.dal.dataobject.risk.basicManage.BizBasicManageDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 基础管理 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface BizBasicManageMapper extends BaseMapperX<BizBasicManageDO> {

    default PageResult<BizBasicManageDO> selectPage(BizBasicManagePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BizBasicManageDO>()
                .likeIfPresent(BizBasicManageDO::getBasicName, reqVO.getBasicName())
                .eqIfPresent(BizBasicManageDO::getDeptId,reqVO.getDeptId())
                .orderByDesc(BizBasicManageDO::getId));
    }

    default List<BizBasicManageDO> selectList(BizBasicManageExportReqVO reqVO) {
        return selectList(new LambdaQueryWrapperX<BizBasicManageDO>()
                .likeIfPresent(BizBasicManageDO::getBasicName, reqVO.getBasicName())
                .eqIfPresent(BizBasicManageDO::getDeptId,reqVO.getDeptId())
                .orderByDesc(BizBasicManageDO::getId));
    }

    List <BizBasicManageRespVO> getBasicPage(BizBasicManagePageReqVO reqVO);

    Integer getBasicCount(BizBasicManagePageReqVO reqVO);

    List<BizBasicManageDO> getBasicForExecl(BizBasicManageExportReqVO reqVO);
}
